package com.example.feign.config;

import feign.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfig {
    /*
    NONE,不记录
    BASIC,记录基本的请求行，响应状态码数据
    HEADERS,记录基本的请求行，响应状态码数据，记录响应头信息
    FULL;记录完成的请求 响应数据
 */
    @Bean
    public Logger.Level loglevel(){
        return Logger.Level.BASIC;
    }
    @Bean
    public UserClientFallbackFactory userClientFallbackFactory(){
        System.out.println("----------create bean of fallbackFactory----------");
        return new UserClientFallbackFactory();
    }
}
